Range majority in constant time and linear space
نویسندگان
چکیده
منابع مشابه
Range Majority in Constant Time and Linear Space
Given an array A of size n, we consider the problem of answering range majority queries: given a query range [i..j] where 1 ≤ i ≤ j ≤ n, return the majority element of the subarray A[i..j] if it exists. We describe a linear space data structure that answers range majority queries in constant time. We further generalize this problem by defining range α-majority queries: given a query range [i..j...
متن کاملApproximate Range Emptiness in Constant Time and Optimal Space
This paper studies the ε-approximate range emptiness problem, where the task is to represent a set S of n points from {0, . . . , U − 1} and answer emptiness queries of the form “[a; b] ∩ S 6= ∅ ?” with a probability of false positives allowed. This generalizes the functionality of Bloom filters from single point queries to any interval length L. Setting the false positive rate to ε/L and perfo...
متن کاملA Linear Time, Constant Space Differencing Algorithm
An efficient differencing algorithm can be used to compress version of files for both transmission over low bandwidth channels and compact storage. This can greatly reduce network traffic and execution time for distributed applications which include software distribution, source code control, file system replication, and data backup and restore. An algorithm for such applications needs to be bo...
متن کاملElastic matching in linear time and constant space
Dynamic time warping (DTW) is well known as an effective method for model-based symbol recognition. Unfortunately, its complexity is quadratic in the number of points present in the symbols to be matched. In this paper, we propose a greedy approximate solution to Tappert’s dynamic program formulation of DTW, and show empirically that it performs as well as the exact solution while requiring onl...
متن کاملA Simple Linear-Space Data Structure for Constant-Time Range Minimum Query
We revisit the range minimum query problem and present a new O(n)-space data structure that supports queries in O(1) time. Although previous data structures exist whose asymptotic bounds match ours, our goal is to introduce a new solution that is simple, intuitive, and practical without increasing asymptotic costs for query time or space.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Information and Computation
سال: 2013
ISSN: 0890-5401
DOI: 10.1016/j.ic.2012.10.011